package com.info33.platform.business.dialogue.controller;

import com.info33.platform.common.mvc.controller.BaseController;
import com.info33.platform.business.dialogue.entity.AiConversation;
import com.info33.platform.business.dialogue.service.AiConversationService;
import com.info33.platform.common.mvc.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LF
 * @date 2023-10-16 10:09:15
 */
@RestController
@RequestMapping("/AiConversation")
@Api(tags = "人工智能_会话")
public class AiConversationController extends BaseController<AiConversationService, AiConversation> {

    private final AiConversationService aiConversationService;

    @Autowired
    public AiConversationController(AiConversationService aiConversationService) {
        super(aiConversationService);
        this.aiConversationService = aiConversationService;
    }

    /**---------------------screen大屏---------------------*/

    /**----------------------app移动端----------------------*/

    /**-----------------------pc后台-----------------------*/

    @GetMapping("/ai/generateConversationGroup")
    @ApiOperation(value = "生成一个会话组",notes = "一个用户只能有一个未关闭会话")
    public Result<AiConversation>generateConversationGroup(){
        return aiConversationService.generateConversationGroup(getCurrentUser());
    }

    @GetMapping("/ai/threadTest")
    @ApiOperation(value = "测试多线程")
    public Result<?>threadTest() {
        return aiConversationService.threadTest();
    }




}
